package com.xjzd.spring.validated;

import jakarta.validation.Valid;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.NotNull;
import lombok.Data;


@Data
public class User {

    @NotNull
    private String name;

    @Max(20)
    private int age;

    @Valid
    private Address address;
}
